function getCookieVal(offset){var endstr=document.cookie.indexOf(";",offset);
if(endstr==-1){endstr=document.cookie.length;
}return unescape(document.cookie.substring(offset,endstr));
}function GetCookie(name){var arg=name+"=";
var alen=arg.length;
var clen=document.cookie.length;
if((document.cookie==null)||(document.cookie.length==null)){return null;
}var i=0;
while(i<clen){var j=i+alen;
if(document.cookie.substring(i,j)==arg){return getCookieVal(j);
}i=document.cookie.indexOf(" ",i)+1;
if(i==0){break;
}}return null;
}var groupName=null;
var hostname=document.location.hostname;
hostname=hostname.replace(/(\.au|\.nz)\.(.*)/,"$1");
switch(hostname){case"seek.co.nz":case"www.seek.co.nz":case"it.seek.co.nz":case"www.it.seek.co.nz":case"yahooxtra.seek.co.nz":case"yahooxtra.it.seek.co.nz":case"msn.seek.co.nz":case"msn.it.seek.co.nz":groupName="seeknz";
break;
case"xtramsn.seek.co.nz":case"www.xtramsn.seek.co.nz":case"xtramsn.it.seek.co.nz":case"www.xtramsn.it.seek.co.nz":groupName="xtramsn";
break;
case"jwren.com.au":case"www.jwren.com.au":case"jobs.jwren.com.au":case"www.jobs.jwren.com.au":groupName="jwren";
break;
case"iconrec.com.au":case"www.iconrec.com.au":case"jobs.iconrec.com.au":case"www.jobs.iconrec.com.au":groupName="iconrec";
break;
case"adecco.com.au":case"www.adecco.com.au":case"jobs.adecco.com.au":case"www.jobs.adecco.com.au":groupName="adecco";
break;
case"seek.com.au":case"www.seek.com.au":case"executive.seek.com.au":case"it.seek.com.au":case"ninemsn.seek.com.au":case"ninemsn.executive.seek.com.au":case"ninemsn.it.seek.com.au":default:groupName="seek";
}var loggedIn=GetCookie("SiteGroup."+groupName);
var username=GetCookie("JSUN."+groupName);
if(username==null){username="";
}
Array.insert=function(a,b,c){a.splice(b,0,c);
};
function GetObjectByName(name){var obj;
for(i=0;
i<document.forms.length;
i++){if(obj=eval("document.forms[i].elements['"+name+"']")){return obj;
break;
}}return null;
}function Find(TheItem){var obj=GetObjectByName(TheItem);
return obj;
}function GetObjectByPartName(ctlName,matchIndex){var obj;
var elementnumber;
var elementname;
var numberOfMatches=0;
var match=$("#"+ctlName).length;
if(match>0){if(matchIndex==undefined||match==matchIndex){obj=$("#"+ctlName)[match-1];
}}return obj;
}function KeywordHints(){}var IsDefaultEnterPressBehaviourOverridden=false;
var ButtonToClickWhenEnterPressed=null;
function ConnectEnterKeyToButton(buttonName){if(buttonName==null){SetIsDefaultEnterPressBehaviourOverridden(false);
}else{SetIsDefaultEnterPressBehaviourOverridden(true);
SetButtonToClickWhenEnterPressed(buttonName);
}}function MapEnterPressToButtonClick(){if(GetIsDefaultEnterPressBehaviourOverridden()){if(document.all){DestroyEvent();
}return FireOffAlternateButtonClick();
}else{document.layout.onsubmit();
}}function TrapAndHandleEnterKeyPress(e){e=e?e:window.event;
var keyCodeEntered=e.keyCode?e.keyCode:e.which?e.which:null;
if(keyCodeEntered==13){return MapEnterPressToButtonClick();
}return true;
}function DestroyEvent(){event.returnValue=false;
event.cancel=true;
}function FireOffAlternateButtonClick(){var ButtonToClick=null;
if(GetButtonToClickWhenEnterPressed()!=null){if(document.all){try{ButtonToClick=eval("document.all."+GetButtonToClickWhenEnterPressed());
}catch(e){ButtonToClick=eval("document.all['"+GetButtonToClickWhenEnterPressed()+"']");
}return InvokeClick(ButtonToClick);
}else{ButtonToClick=document.getElementById(GetButtonToClickWhenEnterPressed());
if(ButtonToClick!=null){return InvokeClick(ButtonToClick);
}else{ButtonToClick=document.getElementsByName(GetButtonToClickWhenEnterPressed());
return InvokeClick(ButtonToClick[0]);
}}}}function InvokeClick(obj){if(obj!=null){if(obj.click){return obj.click();
}else{if(obj.onclick){return obj.onclick();
}else{$(obj).trigger("click");
}}}}function GetIsDefaultEnterPressBehaviourOverridden(){return IsDefaultEnterPressBehaviourOverridden;
}function SetIsDefaultEnterPressBehaviourOverridden(paramValue){IsDefaultEnterPressBehaviourOverridden=paramValue;
}function GetButtonToClickWhenEnterPressed(){return ButtonToClickWhenEnterPressed;
}function SetButtonToClickWhenEnterPressed(paramValue){ButtonToClickWhenEnterPressed=paramValue;
}
if(typeof aCatSelected=="undefined"){var aCatSelected=new Array(0);
}if(typeof aDefaultOverrides=="undefined"){var aDefaultOverrides=new Array(0);
}if(typeof isAdvancedKw=="undefined"){var isAdvancedKw=false;
}var defaultKeywords="Enter keyword(s)";
var isFirst=true;
$(document).ready(function(){$("#AdvSearchLink").click(function(){controlPrefix="cat";
updateSearchFrom(this);
changeToAdvancedSearch();
checkOnsites();
});
$("#bottomAdvSearchLink").click(function(){updateSearchFrom(this);
controlPrefix="bottom";
changeToAdvancedSearch();
});
$("#FewerOptionsBottom").click(function(){updateSearchFrom(this);
controlPrefix="cat";
if(typeof(setTestSwitch)!="undefined"&&(setTestSwitch)){_saved_jobsearchDisplayOrderType="testingtarget";
changeSearchOptions("quick",isCurrentSiteExecutive);
}else{changeToQuickSearch();
}checkOnsites();
});
$("#bottomFewerOptionsBottom").click(function(){updateSearchFrom(this);
controlPrefix="bottom";
changeToQuickSearch();
});
$("#FewerOptionsTop").click(function(){updateSearchFrom(this);
controlPrefix="cat";
if(typeof(setTestSwitch)!="undefined"&&(setTestSwitch)){_saved_jobsearchDisplayOrderType="testingtarget";
changeSearchOptions("quick",isCurrentSiteExecutive);
}else{changeToQuickSearch();
}checkOnsites();
});
$("#bottomFewerOptionsTop").click(function(){updateSearchFrom(this);
controlPrefix="bottom";
changeToQuickSearch();
});
$("#AdvSearch").click(function(){if(ValidateBeforePost("advanced","upper")){$("#layout").submit();
}return false;
});
$("#bottomAdvSearch").click(function(){if(ValidateBeforePost("advanced","lower")){$("#bottomlayout").submit();
}return false;
});
$("#Keywords").focus(function(){controlPrefix="cat";
KeywordsFocus("#Keywords");
});
$("#Keywords").blur(function(){KeywordsBlur("#Keywords");
});
$("#bottomKeywords").focus(function(){controlPrefix="bottom";
KeywordsFocus("#bottomKeywords");
});
$("#bottomKeywords").blur(function(){KeywordsBlur("#bottomKeywords");
});
$("#catindustry, #bottomindustry").change(function(){ValidateCategoryList("industry",0,"occupation",true);
});
$("#catindustry").focus(function(){controlPrefix="cat";
ConnectEnterKeyToButton("DoSearch");
});
$("#bottomindustry").focus(function(){controlPrefix="bottom";
ConnectEnterKeyToButton("bottomDoSearch");
});
$("#catoccupation, #bottomoccupation").change(function(){ValidateCategoryList("occupation",0,"specialisation",true);
disableSubFields();
});
$("#catoccupation").focus(function(){controlPrefix="cat";
ConnectEnterKeyToButton("DoSearch");
});
$("#bottomoccupation").focus(function(){controlPrefix="bottom";
ConnectEnterKeyToButton("bottomDoSearch");
});
$("#catparentlocation, #bottomparentlocation").change(function(){ValidateCategoryList("parentlocation",0,"childlocation",true);
disableSubFields();
UpdateSubClassifications(this);
populateSalary();
});
$("#catparentlocation").focus(function(){controlPrefix="cat";
ConnectEnterKeyToButton("DoSearch");
});
$("#bottomparentlocation").focus(function(){controlPrefix="bottom";
ConnectEnterKeyToButton("bottomDoSearch");
});
$("#catchildlocation, #bottomchildlocation").change(function(){ValidateCategoryList("childlocation",0,"",false);
UpdateSubClassifications(this);
populateSalary();
UpdateParent(this,"parentlocation");
});
$("#catchildlocation").focus(function(){controlPrefix="cat";
ConnectEnterKeyToButton("DoSearch");
});
$("#bottomchildlocation").focus(function(){controlPrefix="bottom";
ConnectEnterKeyToButton("bottomDoSearch");
});
$("#salaryfrom").change(function(){controlPrefix="cat";
setSalaryType("#salaryfrom","#salaryType");
updateSalary(this);
});
$("#bottomsalaryfrom").change(function(){controlPrefix="bottom";
setSalaryType("#bottomsalaryfrom","#bottomsalaryType");
updateSalary(this);
});
$("#salaryfrom").focus(function(){controlPrefix="cat";
ConnectEnterKeyToButton("DoSearch");
});
$("#bottomsalaryfrom").focus(function(){controlPrefix="bottom";
ConnectEnterKeyToButton("bottomDoSearch");
});
$("#salaryto").change(function(){controlPrefix="cat";
setSalaryType("#salaryto","#salaryType");
updateSalary(this);
});
$("#bottomsalaryto").change(function(){controlPrefix="bottom";
setSalaryType("#bottomsalaryto","#bottomsalaryType");
updateSalary(this);
});
$("#salaryto").focus(function(){controlPrefix="cat";
ConnectEnterKeyToButton("DoSearch");
});
$("#bottomsalaryto").focus(function(){controlPrefix="bottom";
ConnectEnterKeyToButton("bottomDoSearch");
});
$("#salaryDisabled").change(function(){disabledSearchSalary(this);
});
$("#bottomsalaryDisabled").change(function(){bottomdisabledSearchSalary(this);
});
$("#ChkUnspecifiedchildlocation").focus(function(){ConnectEnterKeyToButton("DoSearch");
});
$("#bottomChkUnspecifiedchildlocation").focus(function(){ConnectEnterKeyToButton("bottomDoSearch");
});
$("#catworktype, #bottomworktype").change(function(){ValidateCategoryList("worktype",0,"",false);
});
$("#catworktype").focus(function(){controlPrefix="cat";
ConnectEnterKeyToButton("DoSearch");
});
$("#bottomworktype").focus(function(){controlPrefix="bottom";
ConnectEnterKeyToButton("bottomDoSearch");
});
$("#DateRange").focus(function(){controlPrefix="cat";
ConnectEnterKeyToButton("DoSearch");
});
$("#bottomDateRange").focus(function(){controlPrefix="bottom";
ConnectEnterKeyToButton("bottomDoSearch");
});
$("#catfunction #bottomfunction").change(function(){ValidateCategoryList("function",0,"",false);
});
$("#catfunction").focus(function(){controlPrefix="cat";
ConnectEnterKeyToButton("DoSearch");
});
$("#bottomfunction").focus(function(){controlPrefix="bottom";
ConnectEnterKeyToButton("bottomDoSearch");
});
$("#ClosePostcode").click(function(e){e.preventDefault();
hidePostCodeSearch();
});
$("#PostCodeButton").click(function(e){e.preventDefault();
$("#PostCodeSearch").show();
});
$("#bottomClosePostcode").click(function(e){e.preventDefault();
hidePostCodeSearch("bottom");
});
$("#bottomPostCodeButton").click(function(e){e.preventDefault();
$("#bottomPostCodeSearch").show();
});
setupPostCodeSearch("");
setupPostCodeSearch("bottom");
$("#layout .startStyle input,#layout .startStyle select").focus(function(){$("#layout .startStyle").removeClass("startStyle");
});
if(typeof(setTestSwitch)!="undefined"&&(setTestSwitch)){setAnyCopy("industry","All Classifications");
setAnyCopy("occupation","All Sub-Classifications");
}else{setAnyCopy("industry","Any Classification");
setAnyCopy("occupation","Any Sub-Classification");
}setAnyCopy("worktype",isCurrentSiteExecutive?"Full Time, contract & temp":"All Work Types");
setAnyCopy("function","Any Function");
populateKeywords();
controlPrefix="cat";
populateClassiferList("catparentlocation","parentlocation");
populateClassiferList("catworktype","worktype");
populateClassiferList("catindustry","industry");
populateClassiferList("catoccupation","occupation");
populateClassiferList("catfunction","function");
ProcessChildList("parentlocation","childlocation");
ProcessChildList("industry","occupation");
SetInitialSalarySelections();
SetInitialDateRangeSelection();
controlPrefix="bottom";
populateClassiferList("bottomparentlocation","parentlocation");
populateClassiferList("bottomworktype","worktype");
populateClassiferList("bottomindustry","industry");
populateClassiferList("bottomoccupation","occupation");
populateClassiferList("bottomfunction","function");
ProcessChildList("parentlocation","childlocation");
ProcessChildList("industry","occupation");
SynchDuplicate("cat","bottom",isCurrentSiteExecutive);
controlPrefix="cat";
if(isCampus){initializeCampus();
}if(isHomePage){DisplayLastQuickSearch();
updateValue("#searchfrom",isHomePage?"quick":"quickupper");
disableSubFields();
}else{if($("#FewerOptionsTop").length){updateSearchFrom($("#FewerOptionsTop")[0]);
}if($("#bottomFewerOptionsTop").length){updateSearchFrom($("#bottomFewerOptionsTop")[0]);
}updateValue($("#searchtype"),"again");
updateValue($("#bottomsearchtype"),"again");
}$("#layout").submit(function(){if($("#Keywords").val()==defaultKeywords){$("#Keywords").val("");
}});
$("#bottomlayout").submit(function(){if($("#bottomKeywords").val()==defaultKeywords){$("#bottomKeywords").val("");
}});
if(typeof(setTestSwitch)!="undefined"&&(setTestSwitch)){$("#catparentlocation").change(function(){updateLocationIndentation();
});
$("#FewerOptionsTop, #FewerOptionsBottom").click(function(){updateLocationIndentation();
});
updateLocationIndentation();
}});
function updateLocationIndentation(){if($("#searchBoxContainer").hasClass("quickSearch")){var selectedOption=$("#catparentlocation option:selected");
if($(document)[0].currentLocation){if(selectedOption.text()!==$(document)[0].currentLocation.text()&&$(document)[0].currentLocation.val()!=="0"){var oldOptionText=$(document)[0].currentLocation.text();
oldOptionText=indentation+""+oldOptionText;
$(document)[0].currentLocation.text(oldOptionText);
}}var selectedOptionText=selectedOption.text();
selectedOption.text(selectedOptionText.replace(indentation,""));
$(document)[0].currentLocation=$("#catparentlocation option:selected");
}}function updateLocation(locId,areaId){CustomWhichAreaSetValue("childlocation",""+locId+", "+areaId+"");
if(areaId!="null"){$("#"+controlPrefix+"childlocation option[value='"+areaId+"']").attr("selected","selected");
}}function updateValue(ctl,val){if($(ctl).length){$(ctl).val(val);
}}function KeywordsFocus(ctl){$(ctl).removeClass("enter-text");
if($(ctl).val()==defaultKeywords){$(ctl).val("");
}}function KeywordsBlur(ctl){if(!$(ctl).val()||$(ctl).val()==defaultKeywords){$(ctl).addClass("enter-text");
$(ctl).val(defaultKeywords);
}else{$(ctl).removeClass("enter-text");
}}function setSalaryType(ctl,typeControl){var type=$(ctl).val();
if(type=="ch:hourly"){updateValue($(typeControl),"hourly");
}else{if(type=="ch:annual"){updateValue($(typeControl),"annual");
}}}function setupPostCodeSearch(prefix){$("#"+prefix+"PostCode").keypress(function(event){if(event.keyCode==13){$("#"+prefix+"PostCodeSubmit").trigger("click");
return false;
}});
$("#"+prefix+"PostCodeSubmit").click(function(){var url=$("#"+prefix+"PostCodeUrl").val()+"?searchString="+$("#"+prefix+"PostCode").val();
clearPostCodeResults(prefix);
$.getJSON(url,function(data){if(data){var max=10;
var count=data.length;
$("#"+prefix+"ResultCount").html(count+" matches.");
if(count==0){$("#"+prefix+"ResultText").html("No area matches your search.");
}else{if(count>=max){$("#"+prefix+"ResultCount").append(" Please refine your search, only the first "+max+" are shown.");
}$("#"+prefix+"ResultText").html("Choose an area from the list below.");
}$.each(data,function(index,result){var cats=aCategories.get("childlocation");
var id=result.LocationId;
var locId=new String(result.LocationId.toString()+"|1");
var link='<li><a href="#" onclick="updateLocation(\''+locId+"', '"+result.AreaId+"');hidePostCodeSearch('"+prefix+"')\">"+result.Area+", "+result.Locality+", "+result.PostCode+"</a></li>";
$("#"+prefix+"ResultDetails").append(link);
});
if(count>0){$("#"+prefix+"PostCodeResults").show();
$("#"+prefix+"PostCodeNoResults").hide();
}else{$("#"+prefix+"PostCodeResults").hide();
$("#"+prefix+"PostCodeNoResults").show();
}}});
});
}function clearPostCodeResults(prefix){$("#"+prefix+"ResultText").html("");
$("#"+prefix+"ResultCount").html("");
$("#"+prefix+"ResultDetails").html("");
}function hidePostCodeSearch(prefix){if(prefix=="bottom"){$("#bottomPostCodeSearch").hide();
$("#bottomPostCodeResults").hide();
}else{$("#PostCodeSearch").hide();
$("#PostCodeResults").hide();
}}function syncSalary(){var salarytype=aCatSelected.catsalarytype=="salaryhourly"?"hourly":"annual";
if($("#bottomsalaryfrom")[0]){$("#bottomsalaryfrom").val($("#salaryfrom").val());
controlPrefix="bottom";
updateSalary($("#bottomsalaryfrom")[0]);
controlPrefix="cat";
$("#bottomsalaryto").val($("#salaryto").val());
}}function changeToQuickSearch(){if(isHomePage){changeSearchOptions("quick",isCurrentSiteExecutive);
}else{changeSearchOptions("mini",isCurrentSiteExecutive,true);
}$(".jobsearch-index").show();
$(".joblisting-index").show();
$(".footer-promo-panel").show();
$("#bottomsearchBoxContainer").show();
}function changeToAdvancedSearch(){changeSearchOptions("advanced",isCurrentSiteExecutive,true);
$(".jobsearch-index").hide();
$(".joblisting-index").hide();
$(".footer-promo-panel").hide();
}function changeToAdvancedSearchOnSearchProfile(){changeSearchOptionsWithoutPrepopulation("advanced",isCurrentSiteExecutive,true);
$(".jobsearch-index").hide();
$(".joblisting-index").hide();
$(".footer-promo-panel").hide();
}function checkOnsites(){if(isOnsite=="true"){$("#searchBoxContainer").addClass("onsite");
}}function updateSalaryType(salaryType){if(controlPrefix==="cat"){updateValue($("#salaryType"),salaryType);
}else{updateValue($("#bottomsalaryType"),salaryType);
}}function populateKeywords(){if(aCatSelected.keywords){$("#Keywords").val(aCatSelected.keywords);
$("#Keywords").removeClass("enter-text");
}else{if($("#Keywords").val()!=defaultKeywords){$("#Keywords").removeClass("enter-text");
}}}function disabledSearchSalary(isDisabled){if(isDisabled&&!$("#searchBoxContainer").hasClass("advancedSearch")){$("#searchBoxContainer").addClass("salaryDisabled");
$("#salaryDisabled").val(0);
}else{$("#searchBoxContainer").removeClass("salaryDisabled");
}}function bottomdisabledSearchSalary(isDisabled){if(isDisabled&&!$("#bottomsearchBoxContainer").hasClass("advancedSearch")){$("#bottomsearchBoxContainer").addClass("salaryDisabled");
$("#bottomsalaryDisabled").val(0);
}else{$("#bottomsearchBoxContainer").removeClass("salaryDisabled");
}}function updateSearchFrom(ctl){var id=ctl.id;
if(id=="AdvSearchLink"){updateValue("#searchfrom",isHomePage?"advanced":"advancedupper");
}else{if(id=="bottomAdvSearchLink"){updateValue("#bottomsearchfrom","advancedlower");
}else{if(id=="FewerOptionsBottom"||id=="FewerOptionsTop"){updateValue("#searchfrom",isHomePage?"quick":"quickupper");
}else{updateValue("#bottomsearchfrom","quicklower");
}}}}function initializeCampus(){$("#catoccupation").attr("disabled","disabled");
$("#bottomoccupation").attr("disabled","disabled");
$("#catchildlocation").attr("disabled","disabled");
$("#bottomchildlocation").attr("disabled","disabled");
}function disableSubFields(){if(typeof(setTestSwitch)!="undefined"&&(setTestSwitch)){if($("#catindustry").val()=="0"){$("#catoccupation").addClass("disabled");
}else{$("#catoccupation").removeClass("disabled");
}var l=$("#catparentlocation").val();
if(l=="0"||l=="3000|12"||l=="1005|1"||l=="1007|1"||l=="1011|1"||l=="1013|1"){$("#catchildlocation").addClass("disabled");
$("#catchildlocation").attr("disabled","disabled");
}else{$("#catchildlocation").removeClass("disabled");
$("#catchildlocation").attr("disabled","");
}}}
var CriteriasValueQS=GetCookie("QuickSearchCriteria"+marketSegment);
if(CriteriasValueQS==null||CriteriasValueQS==";"){CriteriasValueQS="";
}var KeywordQS="";
var LocationQS="";
var AreaQS="";
var ClassificationQS="";
var SubClassificationQS="";
var FunctionQS="";
var WorkTypeQS="";
var SpecialisationQS="";
var NotSpecifiedQS="";
var SalaryTypeQS="Salary";
var SalaryFromQS="";
var SalaryToQS="";
var NationQS="";
var StateQS="";
var ParentLocationTypeQS="";
var arrayCategoryQS=new Array;
arrayCategoryQS=CriteriasValueQS.split("~");
for(mi=0;
mi<arrayCategoryQS.length;
mi++){var tempArray=new Array;
tempArray=arrayCategoryQS[mi].split("|");
if(tempArray[0]=="V"){if(tempArray[1]!=version){CriteriasValueQS=null;
}}else{if(tempArray[0]=="K"){KeywordQS=unescape(tempArray[1]).replace(/\+/g," ");
}else{if(tempArray[0]=="PL"){ParentLocationTypeQS=tempArray[1];
}else{if(tempArray[0]=="L"){LocationQS=tempArray[1];
}else{if(tempArray[0]=="A"){if(tempArray[1].indexOf(":")==-1){AreaQS=tempArray[1];
}else{AreaQS=tempArray[1].substring(0,tempArray[1].indexOf(":"));
}}else{if(tempArray[0]=="I"){ClassificationQS=tempArray[1];
}else{if(tempArray[0]=="O"){SubClassificationQS=tempArray[1];
}else{if(tempArray[0]=="F"){FunctionQS=tempArray[1];
}else{if(tempArray[0]=="W"){WorkTypeQS=tempArray[1];
}else{if(tempArray[0]=="S"){SpecialisationQS=tempArray[1];
}else{if(tempArray[0]=="CB"){NotSpecifiedQS=tempArray[1];
}else{if(tempArray[0]=="SFT"){SalaryTypeQS=tempArray[1];
}else{if(tempArray[0]=="SF"){SalaryFromQS=tempArray[1];
}else{if(tempArray[0]=="ST"){SalaryToQS=tempArray[1];
}else{if(tempArray[0]=="NA"){NationQS=tempArray[1];
}else{if(tempArray[0]=="SA"){StateQS=tempArray[1];
}}}}}}}}}}}}}}}}}function showClearQuickSearch(){var showClear="false";
var CriteriaArray=new Array("catparentlocation","catchildlocation","catindustry","catoccupation","catfunction","catworktype","catspecialisation","salaryfrom","salaryto");
if(Find("Keywords")){if(document.domain.indexOf("xtramsn")!=-1&&marketSegment!="uk"){if(Find("Keywords").value!="Keywords"){showClear="true";
}}else{if(Find("Keywords").value!=""){showClear="true";
}}}if(showClear=="false"){for(var i=0;
i<CriteriaArray.length;
i++){if(CriteriaArray[i]=="catparentlocation"){if(marketSegment!="uk"&&document.domain.indexOf("co.nz")!=-1){if(Find(CriteriaArray[i])&&Find(CriteriaArray[i]).value!=1017){showClear="true";
break;
}}else{if(marketSegment=="uk"){if(Find(CriteriaArray[i])&&Find(CriteriaArray[i]).value!=1027){showClear="true";
break;
}}else{if(Find(CriteriaArray[i])&&Find(CriteriaArray[i]).value!=0){showClear="true";
break;
}}}}else{if(Find(CriteriaArray[i])&&Find(CriteriaArray[i]).value!=0){showClear="true";
break;
}}}}if(showClear=="true"){}}function DisplayLastQuickSearch(){if(KeywordQS!=""){Find("Keywords").value=KeywordQS;
}if(LocationQS!=""||StateQS!=""||NationQS!=""){if(marketSegment!="uk"){var selectedParentIndex=0;
var parentLocDD=Find("catparentlocation");
var toSelect=LocationQS.replace(/#/g,"|");
parentLocDD.value=toSelect;
selectedParentIndex=parentLocDD.selectedIndex;
if(selectedParentIndex==-1||parentLocDD.options[selectedParentIndex].value!=toSelect){toSelect=StateQS.replace(/#/g,"|");
parentLocDD.value=toSelect;
}selectedParentIndex=parentLocDD.selectedIndex;
if(selectedParentIndex==-1||parentLocDD.options[selectedParentIndex].value!=toSelect){toSelect=NationQS.replace(/#/g,"|");
parentLocDD.value=toSelect;
}selectedParentIndex=parentLocDD.selectedIndex;
if(selectedParentIndex==-1||parentLocDD.options[selectedParentIndex].value!=toSelect){if(defaultIndexes.parentlocation!=undefined){parentLocDD.value=defaultIndexes.parentlocation;
}}ValidateCategoryList("parentlocation",0,"childlocation",true);
}else{ValidateCategoryList("parentlocation",0,"",true);
}}else{if(CriteriasValueQS){Find("catparentlocation").value="0";
ValidateCategoryList("parentlocation",0,"childlocation",true);
}}if(AreaQS!=""||StateQS!=""||LocationQS!=""){var selectedChildIndex=0;
var childLocDD=Find("catchildlocation");
var toSelect=AreaQS.replace(/#/g,"|");
childLocDD.value=toSelect;
selectedChildIndex=childLocDD.selectedIndex;
if(selectedChildIndex==-1||childLocDD.options[selectedChildIndex].value!=toSelect){toSelect=LocationQS.replace(/#/g,"|");
childLocDD.value=toSelect;
}selectedChildIndex=childLocDD.selectedIndex;
if(selectedChildIndex==-1||childLocDD.options[selectedChildIndex].value!=toSelect){toSelect=StateQS.replace(/#/g,"|");
childLocDD.value=toSelect;
}selectedChildIndex=childLocDD.selectedIndex;
if(selectedChildIndex==-1||childLocDD.options[selectedChildIndex].value!=toSelect){childLocDD.value="0";
}ValidateCategoryList("childlocation",0,"",false);
}if(ClassificationQS!=""&&marketSegment!="it"){Find("catindustry").value=ClassificationQS;
ValidateCategoryList("industry",0,"occupation",true);
}if(SubClassificationQS!=""){Find("catoccupation").value=SubClassificationQS;
ValidateCategoryList("occupation",0,"specialisation",true);
}if(SpecialisationQS!=""){if(marketSegment=="it"){var arraySpecialisationQS=new Array;
arraySpecialisationQS=SpecialisationQS.split(":");
var arraycatSpecialisationLengthQS=new Array;
arraycatSpecialisationLengthQS=Find("catspecialisation");
if(arraySpecialisationQS!=""){arraycatSpecialisationLengthQS.options[0].selected=false;
if(Find("JobSearchBox_chkUnspecifiedspecialisation")){Find("JobSearchBox_chkUnspecifiedspecialisation").disabled=false;
}if(Find("ContentInclude_JobSearchBox_chkUnspecifiedspecialisation")){Find("ContentInclude_JobSearchBox_chkUnspecifiedspecialisation").disabled=false;
}}for(mi=0;
mi<arraySpecialisationQS.length;
mi++){for(ni=0;
ni<arraycatSpecialisationLengthQS.length;
ni++){if(arraySpecialisationQS[mi]==arraycatSpecialisationLengthQS.options[ni].value){arraycatSpecialisationLengthQS.options[ni].selected=true;
}}}}else{if(Find("catspecialisation")!=null){Find("catspecialisation").value=SpecialisationQS;
}}}if(FunctionQS!=""){Find("catfunction").value=FunctionQS;
ValidateCategoryList("function",0,"",false);
}if(NotSpecifiedQS!=""){if(Find("JobSearchBox_chkUnspecifiedspecialisation")){Find("JobSearchBox_chkUnspecifiedspecialisation").checked=(NotSpecifiedQS=="true")?true:false;
}if(Find("ContentInclude_JobSearchBox_chkUnspecifiedspecialisation")){Find("ContentInclude_JobSearchBox_chkUnspecifiedspecialisation").checked=(NotSpecifiedQS=="true")?true:false;
}}showClearQuickSearch();
SetInitialSalarySelections();
if(Find("salaryfrom")!=null&&Find("salaryfrom").disabled==false){var targetType="annual";
if(SalaryTypeQS=="SalaryHourly"){targetType="hourly";
}switchSalaryTypeAndResync(targetType);
if(SalaryFromQS!=""){Find("salaryfrom").value=SalaryFromQS;
updateSalary(Find("salaryfrom"));
}if(SalaryToQS!=""){Find("salaryto").value=SalaryToQS;
}}}function ClearQuickCookie(){SEEK.Cookie.clearCookie("QuickSearchCriteria"+marketSegment);
document.getElementById("clearsearch").style.visibility="hidden";
if(Find("Keywords")){Find("Keywords").value="";
}if(Find("catparentlocation")){if(document.domain.indexOf("co.nz")!=-1&&marketSegment!="uk"){Find("catparentlocation").selectedIndex=1;
}else{Find("catparentlocation").selectedIndex=0;
}if(marketSegment=="exec"){ValidateCategoryList("parentlocation",0,"",false);
}else{ValidateCategoryList("parentlocation",0,"childlocation",true);
}}if(Find("catindustry")){Find("catindustry").selectedIndex=0;
ValidateCategoryList("industry",0,"occupation",true);
}if(Find("catoccupation")){if(marketSegment!="main"){Find("catoccupation").selectedIndex=0;
}if(marketSegment=="it"){ValidateCategoryList("occupation",0,"specialisation",true);
}}if(Find("catfunction")){Find("catfunction").selectedIndex=0;
}if(Find("catworktype")){Find("catworktype").selectedIndex=0;
}if(Find("salaryfrom")){Find("salaryfrom").selectedIndex=0;
}if(Find("salaryto")){Find("salaryto").selectedIndex=0;
}}
